package com.itheima.web;

import com.itheima.pojo.User;
import com.itheima.service.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @DubboReference
    UserService userService;
    @RequestMapping("findAll")
    public List<User> findAll(){
        List<User> list = userService.list();
        System.out.println(list);
        return list;
    }

}
